package com.lifa.controller;

import com.lifa.dao.XiaoFeiHuiZongDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

@Controller
@RequestMapping("/XiaoFeiTable")
@Scope("prototype")
public class XiaoFeiHuiZongController {
    @Autowired
    private XiaoFeiHuiZongDao xiaoFeiHuiZongDao;

     @RequestMapping("/xfhz")
     @ResponseBody
    public Map<String,Object> xiaofeihuizong(String taocan_Name, int offset, int limit){
        Map<String,Object> map = new HashMap<String, Object>();

        //System.out.print(id);
        map.put("rows",xiaoFeiHuiZongDao.query(taocan_Name,offset,limit));
        map.put("total",xiaoFeiHuiZongDao.getTotalCount(taocan_Name));
        return map;
    }

}
